<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" th:fragment="content">
<head>
    <meta charset="utf-8">
    <title>Layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}" media="all">
    <link rel="stylesheet" th:href="@{/layui/css/custom.css}" media="all">
</head>
<form id="cost-form" lay-filter="cost-form" class="layui-form" action="" style="display:none;">
    <div class="mainBox">
        <div class="main-container">
            <div class="main-container">
                <div class="layui-form-item">
                    <input type="hidden" id="costFormId" name="id">
                    <input type="hidden" name="version">
                </div>

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label" title="成本年月">成本年月</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" id="yearmonth" name="yearmonth"
                                   placeholder="yyyy-MM">
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label" title="成本项目">成本项目</label>
                        <div class="layui-input-block">
                            <input type="text" maxlength="255" name="name" lay-verify="" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label" title="成本价">成本价</label>
                        <div class="layui-input-inline">
                            <input type="number" name="costPrice" lay-verify="" class="layui-input"
                                   style="width: 182px;">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label" title="操作人姓名">操作人</label>
                        <div class="layui-input-block">
                            <input type="text" maxlength="255" name="operators" lay-verify="" class="layui-input">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="bottom" style="display: none">
        <div class="button-container">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="" lay-filter="cost-form">
                <i class="layui-icon layui-icon-ok"></i>
                提交
            </button>
            <button type="reset" id="costFormReset" class="layui-btn layui-btn-primary layui-btn-sm">
                <i class="layui-icon layui-icon-refresh"></i>
                重置
            </button>
        </div>
    </div>
</form>

<!--查询弹窗-->
<div class="layui-card">
    <div class="layui-card-header" style="height: 100%;">
        <div class="layui-form-item" style="margin-top: 10px;">
            <div class="layui-input-inline">
                <input type="text" name="id" placeholder="编号" class="layui-input">
            </div>
            <div class="layui-input-inline">
                <input type="text" name="name" placeholder="成本项目" class="layui-input">
            </div>
            <div class="layui-input-inline">
                <input type="text" name="yearmonth" placeholder="成本年月" class="layui-input">
            </div>
            <div class="layui-input-inline">
                <input type="text" name="operators" placeholder="操作人姓名" class="layui-input">
            </div>
            <div class="layui-input-inline">
                <input type="text" id="costStart" name="start" placeholder="创建时间范围 起" class="layui-input">
            </div>
            <div class="layui-form-mid">-</div>
            <div class="layui-input-inline">
                <input type="text" id="costEnd" name="end" placeholder="创建时间范围 止" class="layui-input">
            </div>
            <div class="layui-inline">
                <button class="layui-btn" data-type="reload">查询</button>
                <button class="layui-btn" data-type="reset">重置</button>
            </div>
        </div>
    </div>
    <div class="layui-card-body">
        <table id="cost-table" lay-filter="cost-table"></table>
    </div>
</div>

<script type="text/html" id="cost-toolbar">
    <button class="layui-btn layui-btn-sm" lay-event="add">新增</button>
    <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="batchImport">批量导入记录</button>
</script>

<script type="text/html" id="cost-operate-bar">
    <button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="edit">
        <i class="layui-icon layui-icon-edit"></i></button>
    <button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="remove">
        <i class="layui-icon layui-icon-delete"></i></button>
</script>

<script th:src="@{/layui/layui.js}" charset="utf-8"></script>
<script th:src="@{/js/statistical_analysis/cost.js}" charset="utf-8"></script>
